/**
 * Copyright (c) 2004-2017 All Rights Reserved.
 */
package com.zbest.zpay.gw.model;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 *
 * @author czhou3306@gmail.com
 * @version $Id: MessageContext.java, v0.1 2017年3月27日 下午4:20:35 czhou3306@gmail.com Exp $
 */
public class MessageContext {

    private String              channelId;

    /* private GwCommunicationConfigDO communicationConfig;

     private GwMessageTemplateDO     messageTemplate;*/

    private Map<String, Object> requestData  = new HashMap<String, Object>();

    private Map<String, Object> responseData = new HashMap<String, Object>();

    /**机构返回的原始报文*/
    private Object              receiveMessage;

    /**发送到机构的原始报文*/
    private Object              sendMessage;

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public Map<String, Object> getRequestData() {
        return requestData;
    }

    @SuppressWarnings("unchecked")
    public <T extends Object> T getRequestData(String key) {
        return (T) requestData.get(key);
    }

    public void setRequestData(Map<String, Object> requestData) {
        this.requestData = requestData;
    }

    public Map<String, Object> getResponseData() {
        return responseData;
    }

    public void setResponseData(Map<String, Object> responseData) {
        this.responseData = responseData;
    }

    public void putResponseData(String key, Object value) {
        this.responseData.put(key, value);
    }

    public Object getReceiveMessage() {
        return receiveMessage;
    }

    public void setReceiveMessage(Object receiveMessage) {
        this.receiveMessage = receiveMessage;
    }

    public Object getSendMessage() {
        return sendMessage;
    }

    public void setSendMessage(Object sendMessage) {
        this.sendMessage = sendMessage;
    }

    /* public GwCommunicationConfigDO getCommunicationConfig() {
         return communicationConfig;
     }

     public void setCommunicationConfig(GwCommunicationConfigDO communicationConfig) {
         this.communicationConfig = communicationConfig;
     }

     public GwMessageTemplateDO getMessageTemplate() {
         return messageTemplate;
     }

     public void setMessageTemplate(GwMessageTemplateDO messageTemplate) {
         this.messageTemplate = messageTemplate;
     }*/

    /* public Object getResponseMessage() {
         return responseMessage;
     }

     public void setResponseMessage(Object responseMessage) {
         this.responseMessage = responseMessage;
     }

     public Object getRequestMessage() {
         return requestMessage;
     }

     public void setRequestMessage(Object requestMessage) {
         this.requestMessage = requestMessage;
     }*/

}
